export default {
  data () {
    return {
      list: [],
      list_q: {
        checkStockNo: null,
        materialName: null,
        warehouseName: null,
        areaName: null,
        locationName: null,
        batchNo: null,
        checkStockType: null,
        inventoryStartDate: null,
        inventoryEndDate: null,
        inventoryAttr: [],
        checkStockStartDate: null,
        checkStockEndDate: null,
        checkStockAttr: [],
        responsiblePerson: null
      },
      list_q_c: [
        { form_item_prop: { label: '单据号', prop: 'checkStockNo' }, component_name: 'el-input' },
        { form_item_prop: { label: '物料', prop: 'materialName' }, component_name: 'el-input' },
        { form_item_prop: { label: '仓库', prop: 'warehouseName' }, component_name: 'el-input' },
        { form_item_prop: { label: '库区', prop: 'areaName' }, component_name: 'el-input' },
        { form_item_prop: { label: '库位', prop: 'locationName' }, component_name: 'el-input' },
        { form_item_prop: { label: '批号', prop: 'batchNo' }, component_name: 'el-input' },
        { form_item_prop: { label: '盘点类型', prop: 'checkStockType' }, component_name: 'el-input' },
        { form_item_prop: { label: '库存月份', prop: 'inventoryAttr' }, component_name: 'el-date-picker', component_prop: { 'value-format': 'yyyy-MM-dd HH:mm:ss', type: "monthrange", 'range-separator': "至", 'start-placeholder': "开始月份", 'end-placeholder': "结束月份" } },
        { form_item_prop: { label: '盘点日期', prop: 'checkStockAttr' }, component_name: 'el-date-picker', component_prop: { 'value-format': 'yyyy-MM-dd HH:mm:ss', type: "datetimerange", 'range-separator': "至", 'start-placeholder': "开始月份", 'end-placeholder': "结束月份" } },
        { form_item_prop: { label: '负责人', prop: 'responsiblePerson' }, component_name: 'el-input' },
      ],
      list_c: [
        { label: '编号', prop: 'id' },
        { label: '单据号', prop: 'checkStockNo' },
        { label: '物料', prop: 'material.name' },
        { label: '仓库', prop: 'warehouse.name' },
        { label: '库区', prop: 'area.name' },
        { label: '库位', prop: 'location.name' },
        { label: '批号', prop: 'batchNo' },
        { label: '盘点类型', prop: 'checkStockType' },
        { label: '库存月份', prop: 'inventoryDate' },
        { label: '盘点日期', prop: 'checkStockDate' },
        { label: '负责人', prop: 'responsiblePerson' },
        { label: '现库存', prop: 'currentStock' },
        { label: '实际库存', prop: 'actualStock' },
        { label: '原因', prop: 'reason' },
      ],
      list_e: {
        actualStock: null,
        areaId: null,
        batchNo: null,
        checkStockDate: null,
        currentStock: null,
        id: null,
        inventoryDate: null,
        locationId: null,
        materialId: null,
        reason: null,
        responsiblePerson: null,
        warehouseId: null,
        attr: []
      },
      list_e_c: [
        { form_item_prop: { label: '物料', prop: 'materialId', required: true }, component_name: 'el-select', component_prop: { option_data: [], option_prop: { value: 'id', label: 'name' } }, handler: { change: this.materialChange } },
        { form_item_prop: { label: '仓库', prop: 'warehouseId' }, component_name: 'el-select', component_prop: { option_data: [], option_prop: { value: 'id', label: 'name' } }, handler: { change: this.warehouseChange } },
        { form_item_prop: { label: '库区', prop: 'areaId' }, component_name: 'el-select', component_prop: { option_data: [], option_prop: { value: 'id', label: 'name' } }, handler: { change: this.areaChange } },
        { form_item_prop: { label: '库位', prop: 'locationId' }, component_name: 'el-select', component_prop: { option_data: [], option_prop: { value: 'id', label: 'name' }, }, handler: { change: this.locationChange } },
        { form_item_prop: { label: '批号', prop: 'batchNo' }, component_name: 'el-input', component_prop: { disabled: true } },
        { form_item_prop: { label: '现库存', prop: 'currentStock' }, component_name: 'el-input', component_prop: { disabled: true } },
        { form_item_prop: { label: '库存月份', prop: 'inventoryDate', required: true }, component_name: 'el-date-picker', component_prop: { 'value-format': 'yyyy-MM', type: "month" } },
        { form_item_prop: { label: '实际库存', prop: 'actualStock', required: true }, component_name: 'el-input' },
        { form_item_prop: { label: '盘点日期', prop: 'checkStockDate' }, component_name: 'el-date-picker', component_prop: { 'value-format': 'yyyy-MM-dd HH:mm:ss', type: "datetime" } },
        { form_item_prop: { label: '负责人', prop: 'responsiblePerson' }, component_name: 'el-input' },
        { form_item_prop: { label: '原因', prop: 'reason' }, component_name: 'el-input' },
      ],
      pager: {
        page: 1,
        limit: 10,
        total: 0
      },
      visible: false,
      title: '',
      is_add: false
    }
  },
}